<%@ page contentType="text/html; charset=UTF-8" %>
<!-- 引入JSTL标签库 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8" />
	<title>Spring Boot AOP在省级安全生产管理系统的应用</title>

	<!-- 新 Bootstrap 核心 CSS 文件 -->
	<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<!-- 自定义CSS文件 -->
	<c:set var="resourcesPath" value="${pageContext.request.contextPath}"></c:set>
	<link href="${resourcesPath}/jsp/assets/css/staffManageStyle.css" rel="stylesheet" />
	<link href="${resourcesPath}/jsp/assets/css/staffChangeStyle.css" rel="stylesheet" />

</head>

<body style="background-image: url(${resourcesPath}/jsp/assets/img/背景图片.jpg);background-size: 100%">
<!--菜单-->
<%@include file="../管理员header.jsp" %>

<div class="col-md-* col-sm-*">
	<div class="panel panel-default">
		<div class="panel-body">
			<!--标签头-->
			<div class="row col-xs-2">
				<ul class="nav nav-pills nav-stacked ">
					<li class="active">
						<a href="#" >
							数据在线监控
						</a>
					</li>
				</ul>
			</div>

			<div class="col-xs-9">
				<div class="tab-content">
					<!--新增任务-->
					<div class="tab-pane fade active in" id="addTask-pills">
						<h4 id="h4-addTask">数据在线监控</h4>

						<div class="table-c">
							<table class="table table-striped table-bordered table-hover">
								<thead>
								<!--本页面只显示公司 危险源数量-->
								<tr>
									<th> 地区名称 </th>
									<th> 巡查数量 </th>
									<th> 危险源数量 </th>
									<th> 预警 </th>
									<th> 一级 </th>
									<th> 二级 </th>
									<th> 三级 </th>
								</tr>
								</thead>
								<tbody>
								<c:forEach items="${goveMajorStatisticsList}" var="goveMajorStatistics">
									<tr>
										<td>${goveMajorStatistics.city}</td>
										<td>${goveMajorStatistics.inspectionNum}</td>
										<td>${goveMajorStatistics.majorhazardNum}</td>
										<td>${goveMajorStatistics.warningNum}</td>
										<td>${goveMajorStatistics.level1Num}</td>
										<td>${goveMajorStatistics.level2Num}</td>
										<td>${goveMajorStatistics.level3Num}</td>
									</tr>
								</c:forEach>
								<td>
									<button onclick="int=window.clearInterval(int)" class="btn btn-default" onmouseover="this.style.backgroundColor='orange';" onmouseout="this.style.backgroundColor='';">
										停止刷新
									</button>
								</td>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script type="text/javascript">
	// 实时刷新
	var int=self.setInterval("clock()",4000);
	function clock()
	{
		location.href="${pageContext.request.contextPath}/majorhazardregister/dataonline";
	}
	function error(s){
		alert(s);
	}
	$(document).ready(function(){
		if(${empty exist}){

		}else{
			alert("该企业不存在");
		}
	});
</script>
</html>